clear all
set more off

set maxvar 32000
set matsize 11000
*************************************************************************************************
*set scheme aspen, perm
grstyle init
grstyle set plain, horizontal grid

use "$folder/data/data_ready.dta", clear

cd "$folder/output/figures"
local x=18

*******************
* All tables in Appendix D5-D6
*******************
cd "$folder/output/tables"


***************Table A.34: Effect of Contingency, Additional Specifications***************

gen log_fed_reg = log(fed_reg)
label variable log_provisions_18 "Log Provisions"
label variable log_word_count_18 "Log State Statute Words"
label variable log_cond_list_prov_18 "Log Contingent Provisions" 
label variable log_non_cond_list_prov_18 "Log Non-Contingent Provisions" 
label variable shock_prov18 "Shock to Provisions"
label variable shock_cond_list_prov18 "Shock to Contingent Provisions"
label variable shock_non_cond_list_prov18 "Shock to Non-Contingent Provisions"
label variable log_fed_reg "Log Federal Regulation"
label variable growth_gsp "Log Real GSP Growth"
label variable log_real1gsppc "Log Real GSP Per Capita"
label variable log_gsp_a "Log Real GSP"
label variable growth_pc "Log Real GSP Per Capita Growth"
label variable lestab_D "Growth Number Estabilishments"
label variable lprofits_mill_D "Log Establishment Profit Growth"
label variable lcbp_emp_D "Log Employment Growth"
label variable lpop "Log Population"
label variable loginc "Log Income"
label variable logexp "Log Expenses"
label variable loglegexp "Log Legislative Expenses"
label variable dem_control "Democratic Control"
label variable urban "Urban Population"

xtset state year, yearly delta(2)

local x=18
foreach y in cond_list_prov {


* 1 lagged expenditure
ivreghdfe growth_pc (logX_diff`y'_`x' = shock_`y'`x' shock_non_`y'`x') , absorb(state##c.year year one#c.(L.logexp L.logexp2 L.loglegexp L.loglegexp2)) cl(state) 
outreg2 using Table_A34_cond_more, excel replace label  ctitle(Non-Cont)  nocons addtext(State FE, X, Time FE, X, State Trends, X, Lagged Govt Expenditure, X) addstat(First Stage F-stat, e(rkf), Adj R-squared,  e(r2_a)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)


* 2 democ control X year
ivreghdfe growth_pc (logX_diff`y'_`x' = shock_`y'`x' shock_non_`y'`x') , absorb(state##c.year year dem_control) cl(state)
outreg2 using Table_A34_cond_more, excel append label ctitle(Non-Cont)  nocons addtext(State FE, X, Time FE, X, State Trends, X, Pre-Period Demog x Time, X) addstat(First Stage F-stat, e(rkf), Adj R-squared,  e(r2_a)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 3 current-period topic controls
ivreghdfe growth_pc (logX_diff`y'_`x' = shock_`y'`x' shock_non_`y'`x') , absorb(state##c.year year one#c.(share`x'_non_`y'*)) cl(state)
outreg2 using Table_A34_cond_more, excel append label ctitle(Non-Cont)  nocons addtext(State FE, X, Time FE, X, State Trends, X, Topic Share, X) addstat(First Stage F-stat, e(rkf), Adj R-squared,  e(r2_a)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 4 lagged dep var
ivreghdfe growth_pc (logX_diff`y'_`x' = shock_`y'`x' shock_non_`y'`x'), absorb(state##c.year year one#c.(L.growth_pc)) cl(state)
outreg2 using Table_A34_cond_more, excel append label  ctitle(Non-Cont)  nocons addtext(State FE, X, Time FE, X,State Trends, X, Lagged Growth, X) addstat(First Stage F-stat, e(rkf), Adj R-squared,  e(r2_a)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)


* 5  all
ivreghdfe growth_pc (logX_diff`y'_`x' = shock_`y'`x' shock_non_`y'`x'), absorb(state##c.year year##c.(gsp_initial  growth_initial gsp_pc_initial pc1_sectors pc2_sectors pc3_sectors pc4_sectors initial_lpop initial_lpop2  initial_urban initial_foreign) one#c.(share`x'_non_`y'* L.logexp L.logexp2 L.loglegexp L.loglegexp2 L.growth_pc)) cl(state)
outreg2 using Table_A34_cond_more, excel append label  ctitle(Non-Cont)  nocons addtext(State FE, X, Time FE, X, State Trends, X, Lagged Govt Expenditure, X, Initial Econ x Time, X, PC Sector Shares x Time, X, Pre-Period Demog x Time, X, Govt Expenditure, X, Topic Share, X, Lagged Growth, X) addstat(First Stage F-stat, e(rkf), Adj R-squared,  e(r2_a)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)


}

***************Table A.35: Effect of Contingencies on Additional Economic Variables***************

*1 GSP Growth
ivreghdfe growth_gsp  (log_cond_list_prov_18 log_non_cond_list_prov_18 = shock_cond_list_prov18 shock_non_cond_list_prov18) , absorb(state year) cl(state)
outreg2 using Table_A35_other_out_cont, excel replace label  ctitle(GSP)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

*2 Population Growth
ivreghdfe lpop_D  (log_cond_list_prov_18 log_non_cond_list_prov_18 = shock_cond_list_prov18 shock_non_cond_list_prov18) , absorb(state year) cl(state)
outreg2 using Table_A35_other_out_cont, excel append label ctitle(Pop)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)


*3 Employment Growth
ivreghdfe lcbp_emp_D  (log_cond_list_prov_18 log_non_cond_list_prov_18 = shock_cond_list_prov18 shock_non_cond_list_prov18) , absorb(state year) cl(state)
outreg2 using Table_A35_other_out_cont, excel append label  ctitle(Empl)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)


*4 Profits Growth
ivreghdfe lprofits_mill_D  (log_cond_list_prov_18 log_non_cond_list_prov_18 = shock_cond_list_prov18 shock_non_cond_list_prov18) , absorb(state year) cl(state)
outreg2 using Table_A35_other_out_cont, excel append label ctitle(Profit)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

*5 Income PC
ivreghdfe loginc_D  (log_cond_list_prov_18 log_non_cond_list_prov_18 = shock_cond_list_prov18 shock_non_cond_list_prov18) , absorb(state year) cl(state)
outreg2 using Table_A35_other_out_cont, excel append label ctitle(Inc)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)


*6 Establishment Growth
ivreghdfe lestab_D  (log_cond_list_prov_18 log_non_cond_list_prov_18 = shock_cond_list_prov18 shock_non_cond_list_prov18), absorb(state year) cl(state)
outreg2 using Table_A35_other_out_cont, excel append label  ctitle(Est)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

***************Table A.36: Effect of Contingent and Non-Contingent Clauses by Themselves***************
foreach x in 18 {

* 1 // year FE, state FE - cont
ivreghdfe growth_pc (log_cond_list_prov_`x' = shock_cond_list_prov`x') , absorb(state year) cl(state)
outreg2 using Table_A36_cont_sep, excel replace label  ctitle(2SLS)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 2 // year, state, state trend - cont
ivreghdfe growth_pc (log_cond_list_prov_`x' = shock_cond_list_prov`x') , absorb(state##c.year year)  cl(state)
outreg2 using Table_A36_cont_sep, excel append label ctitle(2SLS)  nocons addtext(State FE, X, Time FE, X, State-Specific Trends, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 3 // year, state, state trend - cont
ivreghdfe growth_pc (log_cond_list_prov_`x' = shock_cond_list_prov`x') log_non_cond_list_prov_`x', absorb(state##c.year year)  cl(state)
outreg2 using Table_A36_cont_sep, excel append label ctitle(2SLS)  nocons addtext(State FE, X, Time FE, X, State-Specific Trends, X, Contingency Control, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)


* 4 // year FE, state FE - non-cont
ivreghdfe growth_pc (log_non_cond_list_prov_`x' = shock_non_cond_list_prov`x') , absorb(state year) cl(state)
outreg2 using Table_A36_cont_sep, excel append label  ctitle(2SLS)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 5 // year, state, state trend - non-cont
ivreghdfe growth_pc (log_non_cond_list_prov_`x' = shock_non_cond_list_prov`x') , absorb(state##c.year year)  cl(state)
outreg2 using Table_A36_cont_sep, excel append label ctitle(2SLS)  nocons addtext(State FE, X, Time FE, X, State-Specific Trends, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 6 // year, state, state trend - non-cont
ivreghdfe growth_pc (log_non_cond_list_prov_`x' = shock_non_cond_list_prov`x') log_cond_list_prov_`x', absorb(state##c.year year)  cl(state)
outreg2 using Table_A36_cont_sep, excel append label ctitle(2SLS)  nocons addtext(State FE, X, Time FE, X, State-Specific Trends, X, Non-Contingency Control,X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

}

******Table A.37: Concavity Effects ******


label variable growth_gsp "Growth GSP"
label variable log_real1gsppc "Log Real Income per capita"
label variable growth_pc "Growth Real Income per capita"
label variable lestab_D "Growth Number Estabilishments"
label variable lprofits_mill_D "Growth State Profits, Millions"
label variable lcbp_emp_D "Growth Employment"

label variable log_provisions_18 "Legislative Detail"
label variable log_cond_list_prov_18 "Contingent Provisions" 
label variable log_non_cond_list_prov_18 "Non-Contingent Provisions" 
label variable shock_prov18 "Shock to Legislative Detail"
label variable shock_cond_list_prov18 "Shock to Contingencies"
label variable shock_non_cond_list_prov18 "Shock to Non-Contingencies"

label variable gsp_initial "Initial Gross State Product"
label variable growth_initial "Initial GSP Growth"
label variable gsp_pc_initial "Initial GSP per capita"
label variable lestab_D "Growth Number Establishments"
label variable lprofits_mill_D "Growth State Profits, Millions"
label variable lcbp_emp_D "Growth Employment"

foreach x in 18 {

xtile provprevq3 = log_prov_prev5_`x', n(3)

*Low
* 1 // year FE, state FE
ivreghdfe growth_pc (log_provisions_`x' = shock_prov`x') if provprevq3==1, absorb(state year) cl(state)
outreg2 using Table_A37_conc, excel replace label  ctitle(Low Conc)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 2 // year, state, state trend
ivreghdfe growth_pc  (log_provisions_`x' = shock_prov`x') if provprevq3==1, absorb(state##c.year year)  cl(state)
outreg2 using Table_A37_conc, excel append label ctitle(Low Conc)  nocons addtext(State FE, X, Time FE, X, State-Specific Trends, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 3 // year, state, state trend
ivreghdfe growth_pc (logX_diffcond_list_prov_`x' = shock_cond_list_prov`x' shock_non_cond_list_prov`x') if provprevq3==1, absorb(state##c.year year)  cl(state)
outreg2 using Table_A37_conc, excel append label ctitle(Low Conc- Diff)  nocons addtext(State FE, X, Time FE, X, State-Specific Trends, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)


*Medium
* 4 // year FE, state FE
ivreghdfe growth_pc (log_provisions_`x' = shock_prov`x') if provprevq3==2, absorb(state year) cl(state)
outreg2 using Table_A37_conc, excel append label  ctitle(Med Conc)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 5 // year, state, state trend
ivreghdfe growth_pc  (log_provisions_`x' = shock_prov`x') if provprevq3==2, absorb(state##c.year year)  cl(state)
outreg2 using Table_A37_conc, excel append label ctitle(Med Conc)  nocons addtext(State FE, X, Time FE, X, State-Specific Trends, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

*High
* 2 // year FE, state FE
ivreghdfe growth_pc (log_provisions_`x' = shock_prov`x') if provprevq3==3, absorb(state year) cl(state)
outreg2 using Table_A37_conc, excel append label  ctitle(High Conc)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 3 // year, state, state trend
ivreghdfe growth_pc  (log_provisions_`x' = shock_prov`x') if provprevq3==3, absorb(state##c.year year)  cl(state)
outreg2 using Table_A37_conc, excel append label ctitle(High Conc)  nocons addtext(State FE, X, Time FE, X, State-Specific Trends, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)


}

*************** Table A.38-A39: Concavity Effects, with Residualized Previous Detail Ranking *****

net install http://www.stata.com/users/kcrow/tab2xl, replace
xtile Concavity = log_prov_prev5_18, n(3)
xtile Uncertainty = state_news_uncertain, n(3)

tab2xl Concavity Uncertainty using Table_A38_concavity_uncertainty, col(1) row(1)


foreach x in 18 {
	
reghdfe  log_prov_prev5_`x' , absorb(state year) cl(state) residuals(log_provprev5_`x'r1)
xtile log_provprev_res3 = log_provprev5_`x'r1, n(3)	

* 1 low, year FE, state FE
ivreghdfe growth_pc (log_provisions_`x' = shock_prov`x') if log_provprev_res3==1, absorb(state year) cl(state)
outreg2 using Table_A39_conc_res, excel replace label  ctitle(Low Conc)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 2 low, year, state, state trend
ivreghdfe growth_pc  (log_provisions_`x' = shock_prov`x') if log_provprev_res3==1, absorb(state##c.year year)  cl(state)
outreg2 using Table_A39_conc_res, excel append label ctitle(Low Conc)  nocons addtext(State FE, X, Time FE, X, State-Specific Trends, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 3 low, diff, year, state, state trend
ivreghdfe growth_pc  (logX_diffcond_list_prov_`x' = shock_cond_list_prov`x' shock_non_cond_list_prov`x') if log_provprev_res3==1, absorb(state##c.year year)  cl(state)
outreg2 using Table_A39_conc_res, excel append label ctitle(Low Conc)  nocons addtext(State FE, X, Time FE, X, State-Specific Trends, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 4 Medium, year FE, state FE
ivreghdfe growth_pc (log_provisions_`x' = shock_prov`x') if log_provprev_res3==2, absorb(state year) cl(state)
outreg2 using Table_A39_conc_res, excel append label  ctitle(Med Conc)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 5 Medium, year, state, state trend
ivreghdfe growth_pc  (log_provisions_`x' = shock_prov`x') if log_provprev_res3==2, absorb(state##c.year year)  cl(state)
outreg2 using Table_A39_conc_res, excel append label ctitle(Med Conc)  nocons addtext(State FE, X, Time FE, X, State-Specific Trends, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 6 High, year FE, state FE
ivreghdfe growth_pc (log_provisions_`x' = shock_prov`x') if log_provprev_res3==3, absorb(state year) cl(state)
outreg2 using Table_A39_conc_res, excel append label  ctitle(High Conc)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 7 High, year, state, state trend
ivreghdfe growth_pc  (log_provisions_`x' = shock_prov`x') if log_provprev_res3==3, absorb(state##c.year year)  cl(state)
outreg2 using Table_A39_conc_res, excel append label ctitle(High Conc)  nocons addtext(State FE, X, Time FE, X, State-Specific Trends, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

}


*************** Table A.40: Uncertainty Effects, with Residualized Uncertainty Ranking *****
foreach x in 18 {
reghdfe  state_news_uncertain , absorb(state year) cl(state) residuals(state_news_uncertain_r1)
xtile state_news_uncertain_res3 = state_news_uncertain_r1, n(3)

*Low
* 1 // year FE, state FE
ivreghdfe growth_pc (log_provisions_`x' = shock_prov`x') if state_news_uncertain_res3 == 1, absorb(state year) cl(state)
outreg2 using Table_A40_unc_res, excel replace label  ctitle(Low Unc - Prov)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)


* 2 // year FE, state FE,diff
ivreghdfe growth_pc (logX_diffcond_list_prov_`x' = shock_cond_list_prov`x' shock_non_cond_list_prov`x') if state_news_uncertain_res3 == 1, absorb(state year) cl(state)
outreg2 using Table_A40_unc_res, excel append label  ctitle(Low Unc - Diff)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

*Med
* 3 // year FE, state FE
ivreghdfe growth_pc (log_provisions_`x' = shock_prov`x') if state_news_uncertain_res3 == 2, absorb(state year) cl(state)
outreg2 using Table_A40_unc_res, excel append label  ctitle(Med Unc - Prov)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 4 // year FE, state FE, diff
ivreghdfe growth_pc (logX_diffcond_list_prov_`x' = shock_cond_list_prov`x' shock_non_cond_list_prov`x') if state_news_uncertain_res3 == 2, absorb(state year) cl(state)
outreg2 using Table_A40_unc_res, excel append label  ctitle(Med Unc - Diff)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

*High
* 5 // year FE, state FE
ivreghdfe growth_pc (log_provisions_`x' = shock_prov`x') if state_news_uncertain_res3 == 3, absorb(state year) cl(state)
outreg2 using Table_A40_unc_res, excel append label  ctitle(High Unc - Prov)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 6 // year, state, state trend
ivreghdfe growth_pc  (log_provisions_`x' = shock_prov`x') if state_news_uncertain_res3 == 3, absorb(state##c.year year)  cl(state)
outreg2 using Table_A40_unc_res, excel append label keep(log_provisions_`x') ctitle(High Unc - Prov)  nocons addtext(State FE, X, Time FE, X, State-Specific Trends, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 7 // year FE, state FE
ivreghdfe growth_pc (log_cond_list_prov_`x' log_non_cond_list_prov_`x' = shock_cond_list_prov`x' shock_non_cond_list_prov`x') if state_news_uncertain_res3 == 3, absorb(state year) cl(state)
outreg2 using Table_A40_unc_res, excel append label  ctitle(High Unc - Cont Non-cont)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 8 // year, state, state trend
ivreghdfe growth_pc (log_cond_list_prov_`x' log_non_cond_list_prov_`x' = shock_cond_list_prov`x' shock_non_cond_list_prov`x') if state_news_uncertain_res3 == 3, absorb(state##c.year year)  cl(state)
outreg2 using Table_A40_unc_res, excel append label ctitle(High Unc - Cont Non-cont)  nocons addtext(State FE, X, Time FE, X, State-Specific Trends, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 9 // year FE, state FE
ivreghdfe growth_pc (logX_diffcond_list_prov_`x' = shock_cond_list_prov`x' shock_non_cond_list_prov`x') if state_news_uncertain_res3 == 3, absorb(state year) cl(state)
outreg2 using Table_A40_unc_res, excel append label  ctitle(High Unc - Diff)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 10 // year, state, state trend
ivreghdfe growth_pc (logX_diffcond_list_prov_`x' = shock_cond_list_prov`x' shock_non_cond_list_prov`x')  if state_news_uncertain_res3 == 3, absorb(state##c.year year)  cl(state)
outreg2 using Table_A40_unc_res, excel append label ctitle(High Unc - Diff)  nocons addtext(State FE, X, Time FE, X, State-Specific Trends, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)
}


*************** Table A.41 Uncertainty Effects, with Lagged Economic Growth Control *****
xtile state_news_uncertain3 = state_news_uncertain, n(3)

foreach x in 18 {
*Low
* 1  year FE, state FE
ivreghdfe growth_pc (log_provisions_`x' = shock_prov`x') L_growth_pc if state_news_uncertain3 == 1, absorb(state year) cl(state)
outreg2 using Table_A41_unc_Lgrowth, excel replace label  ctitle(Low Unc - Prov)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)


*Med
* 2  year FE, state FE
ivreghdfe growth_pc (log_provisions_`x' = shock_prov`x') L_growth_pc if state_news_uncertain3 == 2, absorb(state year) cl(state)
outreg2 using Table_A41_unc_Lgrowth, excel append label  ctitle(Med Unc - Prov)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)


*High
* 3  year FE, state FE
ivreghdfe growth_pc (log_provisions_`x' = shock_prov`x') L_growth_pc if state_news_uncertain3 == 3, absorb(state year) cl(state)
outreg2 using Table_A41_unc_Lgrowth, excel append label  ctitle(High Unc - Prov)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)


* 4  year FE, state FE, both
ivreghdfe growth_pc (log_cond_list_prov_`x' log_non_cond_list_prov_`x' = shock_cond_list_prov`x' shock_non_cond_list_prov`x') L_growth_pc if state_news_uncertain3 == 3, absorb(state year) cl(state)
outreg2 using Table_A41_unc_Lgrowth, excel append label  ctitle(High Unc - Cont Non-cont)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 5  year, state, both, state trend
ivreghdfe growth_pc (log_cond_list_prov_`x' log_non_cond_list_prov_`x' = shock_cond_list_prov`x' shock_non_cond_list_prov`x') L_growth_pc if state_news_uncertain3 == 3, absorb(state##c.year year)  cl(state)
outreg2 using Table_A41_unc_Lgrowth, excel append label ctitle(High Unc - Cont Non-cont)  nocons addtext(State FE, X, Time FE, X, State-Specific Trends, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 6 year FE, state FE, diff
ivreghdfe growth_pc (logX_diffcond_list_prov_`x' = shock_cond_list_prov`x' shock_non_cond_list_prov`x') L_growth_pc if state_news_uncertain3 == 3, absorb(state year) cl(state)
outreg2 using Table_A41_unc_Lgrowth, excel append label  ctitle(High Unc - Diff)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 7  year, state, state trend, diff
ivreghdfe growth_pc (logX_diffcond_list_prov_`x' = shock_cond_list_prov`x' shock_non_cond_list_prov`x') L_growth_pc if state_news_uncertain3 == 3, absorb(state##c.year year)  cl(state)
outreg2 using Table_A41_unc_Lgrowth, excel append label ctitle(High Unc - Diff)  nocons addtext(State FE, X, Time FE, X, State-Specific Trends, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

}


************Table A.42 Effects when Splitting by Terciles in Recent Growth ******
xtile L_growth_pc3 = L_growth_pc, n(3)

foreach x in 18 {
*Low
* 1  year FE, state FE
ivreghdfe growth_pc (log_provisions_`x' = shock_prov`x') if L_growth_pc3 == 1, absorb(state year) cl(state)
outreg2 using Table_A42_BusinessCycle, excel replace label  ctitle(Low Growth - Prov)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 2  year FE, state FE, diff
ivreghdfe growth_pc (logX_diffcond_list_prov_`x' = shock_cond_list_prov`x' shock_non_cond_list_prov`x') if L_growth_pc3 == 1, absorb(state year) cl(state)
outreg2 using Table_A42_BusinessCycle, excel append label  ctitle(Low Growth - Diff)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

*Med
* 3  year FE, state FE
ivreghdfe growth_pc (log_provisions_`x' = shock_prov`x') if L_growth_pc3 == 2, absorb(state year) cl(state)
outreg2 using Table_A42_BusinessCycle, excel append label  ctitle(Med Growth - Prov)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 4  year FE, state FE, diff
ivreghdfe growth_pc (logX_diffcond_list_prov_`x' = shock_cond_list_prov`x' shock_non_cond_list_prov`x') if L_growth_pc3 == 2, absorb(state year) cl(state)
outreg2 using Table_A42_BusinessCycle, excel append label  ctitle(Med Growth - Diff)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

*High
* 5 year FE, state FE
ivreghdfe growth_pc (log_provisions_`x' = shock_prov`x') if L_growth_pc3 == 3, absorb(state year) cl(state)
outreg2 using Table_A42_BusinessCycle, excel append label  ctitle(High Growth - Prov)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +)  nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

* 6  year FE, state FE, diff
ivreghdfe growth_pc (logX_diffcond_list_prov_`x' = shock_cond_list_prov`x' shock_non_cond_list_prov`x') if L_growth_pc3 == 3, absorb(state year) cl(state)
outreg2 using Table_A42_BusinessCycle, excel append label  ctitle(High Growth - Diff)  nocons addtext(State FE, X, Time FE, X) addstat(First Stage F-stat, e(rkf), R-squared,  e(r2)) alpha(0.01, 0.05, 0.1) symbol(**, *, +) nor2 nonotes addnote(SE clustered by `e(clustvar)', **p<.01; *p<.05; +p<.1)

}


